package ru.averta.notes.dao.impl;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import ru.averta.notes.dao.NoteDao;
import ru.averta.notes.domain.Note;

@Repository
public class NoteDaoImpl extends GenericDaoHibernateImpl<Note, Long> implements
		NoteDao {

	@SuppressWarnings("unchecked")
	public List<Note> findByUser(String user) {
		return createCriteria().add(Restrictions.eq("userName", user)).list();
	}


}
